Mass data storage devices, such as disc drives or magnetic tape drives, include a storage media enabling users of modern computer systems to store and retrieve vast amounts of data in a fast and efficient manner. Generally, to access data on the storage media a relatively slow (in computer terms) mechanical process is employed. For example, a typical disc drive houses a number of circular, magnetic discs (such as one to ten) which are axially aligned and rotated by a spindle motor at a constant, high speed (such as 10,000 revolutions per minute). As the discs are rotated, an actuator assembly moves an array of read/write heads out over the surfaces of the discs to store and retrieve the data from tracks defined on the surfaces of the discs.
A disc drive is typically connected to a host computer having an operating system, a filing system, and one or more applications running. Via the OS, the file system, and/or the applications, the host computer issues commands to the disc drive. Exemplary commands are read, write, and flush cache commands. A disc drive employs a cache, which is typically a high-speed semiconductor memory chip that enables the disc drive to rapidly manage the data and commands received from the host computer. Without caching, all read and write commands from the host computer would result in a hard disc access, which incurs significant time latency due to mechanical positioning of the head relative to the hard disc. By caching, the disc drive can buffer data that is likely to be accessed by the host computer so that when the data is actually accessed, the data is made available more quickly. Typically a disc drive utilizes a default set of algorithms to manage the cache and interface with the host computer, regardless of the host computer platform.
Traditionally, the algorithms used by the disc drive are selected to optimize one or more benchmarks. Disc drive manufacturers test disc drives relative to certain performance benchmarks. These benchmarks are published in trade magazines and are used for marketing. To test the performance benchmarks of disc drives, applications such as WinBench, Iometer, MacBench, H2Bench, and BlueNun, are used to test disc drives on relevant host platforms. For example, the application WinBench is used to test the performance of a disc drive in a PC environment using a Microsoft Windows® operating system. Likewise, the application MacBench can be used to test the performance of a disc drive on an Apple MacIntosh® computer. It has been found that in general all performance benchmarks for a disc drive cannot be optimized on all computer platforms because command sequencing is different among the various platforms. Because command sequencing varies among computer platforms, for one set of cache management algorithms, the cache hit ratio will vary among the computer platforms. When the cache hit ratio is lower, performance is lower. Thus, for example, while performance benchmarks may be optimized in a Microsoft Windows® environment, those performance benchmarks may not be optimized in an Apple® operating system environment.
One reason for the inability to optimize for all platforms is because typical disc drives utilize only one set of cache management algorithms. Traditional disc drives do not adapt the cache management algorithms to the platform on which the disc drive is running. Therefore, while the cache management algorithm may be optimal for a Microsoft Windows® environment, it may be sub-optimal for an Apple environment utilizing a different sequence of commands. For example, in the Microsoft Windows® NTFS operating system, the host regularly writes to the middle cylinders of the disc and regularly flushes the cache to disc. In the Microsoft Windows® NTFS operating system, it is more efficient to wait for the flush cache command before committing these writes to disc. In the Microsoft Windows 98® FATS operating system, the host computer rarely sends the flush cache command. To optimize disc drive performance in the Microsoft Windows 98® FATS operating system, the disc drive should flush writes as quickly as possible so that the write buffer space can be reused for future write commands from the host. As a result, benchmark test results have not been subject to improvement across all host computer platforms. Therefore, there is a need for a system and method to adapt cache management algorithms to the host platform connected to the disc drive, so that benchmark results are improved across all host computer platforms.
Furthermore, a constant push exists in the industry toward improving benchmark scores. Benchmark scores are publicized so that computer purchasers can make judgments as to which computer and/or disc drive to purchase. Thus, it is essential for disc drive manufacturers to improve benchmark scores. As a result, performance benchmarks for disc drives under WinBench, for example, have been improving by around ten percent per year in recent years. Since the cache memory is a limited and relatively costly resource in the disc drive, it is desirable to utilize the cache memory as efficiently as possible, and benchmark scores are directly related to cache memory utilization.
Additionally, from a computer user's standpoint, perceived performance is improved when the cache management algorithms are matched with the host computer command sequence. However, since typical disc drives use only a default set of cache management algorithms that are not necessarily optimized for a user's host computer, the perceived performance is lower from the user's point of view. Therefore, there is a need for a dynamic cache management algorithm selection method and system to improve drive performance during benchmark testing and during actual computer use.